#ifndef H_DEBUG_20071014
#define H_DEBUG_20071014

/*
	DEBUG_INFO is used just for informations
	DEBUG_ERR is used to report some errors
	DEBUG_FATAL is used to report fatal errors which make the server shutdown
*/
/*	debug labels	*/
#define		DEBUG_INFO		1
#define		DEBUG_ERR		2
#define		DEBUG_FATAL		3

/*
	DEBUG_SYS is used to report system errors in the sys stdout specific file
	DEBUG_MEM is used to report memory errors in the mem stdout specific file
*/
/*	debug types	*/
/*	DEBUG_SYS and DEBUG_MEM shouldn't be combined	*/
#define		DEBUG_SYS		0x01
#define		DEBUG_MEM		0x02
#define		DEBUG_STDOUT	0x04

/*	debug formats	"[time]:[label]:[Message]"	*/
#define		DEBUG_INFO_FMT	"%s:INFO:%s\n"
#define		DEBUG_ERR_FMT	"%s:ERROR:%s\n"
#define		DEBUG_FATAL_FMT	"%s:FATAL:%s\n"

int set_mtrace (void);
void unset_mtrace (void);

int InitDebugFiles (void);
int Debug (int label, const char* fmt, ...);


#endif

